﻿<c:WindowExt x:Class="personalplaner.gui.stamm.windows.SetPersonAnstellung"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:c="clr-namespace:personalplaner.common.controls;assembly=personalplaner.common"
             xmlns:vm="clr-namespace:personalplaner.common.mvvm.factory;assembly=personalplaner.common"
             xmlns:fac="clr-namespace:personalplaner.gui.stamm.viewmodels.factories"
             vm:ViewModelLoader.FactoryType="{x:Type fac:SetPersonAnstellungModelFactory}"
             SizeToContent="Height"
             Width="450"
             mc:Ignorable="d" 
             ShowInTaskbar="False"
             WindowStartupLocation="CenterOwner"
             Foreground="#E1000000">

    <Window.Background>
        <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
            <LinearGradientBrush.GradientStops>
                <GradientStop Color="White" Offset="0"/>
                <GradientStop Color="White" Offset="0.6"/>
                <GradientStop Color="#FFEDEDED" Offset="1"/>
            </LinearGradientBrush.GradientStops>
        </LinearGradientBrush>
    </Window.Background>

    <Grid Margin="5">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>

        <TextBlock Text="Anstellungen" FontSize="22" FontWeight="Thin" Foreground="#E1000000" Margin="50,-5,0,25"/>
        
        <Border Background="Transparent" BorderBrush="Transparent" BorderThickness="1" Padding="10,10,10,10" Grid.Row="1">
            <Grid Margin="5">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>

                <TextBlock Text="Anstellung" Margin="0,0,10,0"/>
                <ComboBox Grid.Column="1" Grid.Row="0" 
                  ItemsSource="{Binding Anstellungen}"
                  DisplayMemberPath="Name"
                  SelectedItem="{Binding Model.SelectedAnstellung}"/>

                <TextBlock Text="Von" Grid.Row="1" Margin="0,0,10,0"/>
                <DatePicker Grid.Column="1" Grid.Row="1" SelectedDate="{Binding Model.Von}" />

                <TextBlock Text="Bis" Grid.Row="1" Grid.Column="2" Margin="10,0,10,0"/>
                <DatePicker Grid.Column="3" Grid.Row="1" SelectedDate="{Binding Model.Bis}" />
            </Grid>
        </Border>
        <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.ColumnSpan="4" HorizontalAlignment="Right" Margin="0,20,40,20">
            <Button MinWidth="60" Margin="5" IsDefault="True" Command="{Binding OkCommand}">
                <TextBlock Text="OK"/>
            </Button>
            <Button MinWidth="60" Margin="5" IsCancel="True" Command="{Binding CancelCommand}">
                <TextBlock Text="Abbrechen"/>
            </Button>
        </StackPanel>

    </Grid>
</c:WindowExt>
